package com.lcifn.spring.aop.bean;

/**
 * 谷歌浏览器的代理
 * @author lichao
 *
 */
public class ChromeBrowserProxy implements Browser{
	
	private ChromeBrowser browser;
	
	public ChromeBrowserProxy(ChromeBrowser chromeBrowser) {
		this.browser = chromeBrowser;
	}

	public void visitInternet() {
		encrypt();
		browser.visitInternet();
		decrypt();
	}
	
	public void listenToMusic() {
		encrypt();
		browser.listenToMusic();
		decrypt();
		
	}
	
	// 加密
	private void encrypt(){
		System.out.println("encrypt ...");
	}
	
	// 解密
	private void decrypt(){
		System.out.println("decrypt ...");
	}



}
